﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.hive;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x0200007E RID: 126
	public class TAlterIndexStmt : TCustomSqlStatement
	{
		// Token: 0x17000049 RID: 73
		// (get) Token: 0x06000309 RID: 777 RVA: 0x002F9674 File Offset: 0x002F7874
		// (set) Token: 0x0600030A RID: 778 RVA: 0x002F967C File Offset: 0x002F787C
		public virtual TObjectName IndexName
		{
			get
			{
				return this.indexName;
			}
			set
			{
				this.indexName = value;
			}
		}

		// Token: 0x0600030B RID: 779 RVA: 0x002F9685 File Offset: 0x002F7885
		public TAlterIndexStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstalterindex;
		}

		// Token: 0x1700004A RID: 74
		// (get) Token: 0x0600030C RID: 780 RVA: 0x002F9696 File Offset: 0x002F7896
		// (set) Token: 0x0600030D RID: 781 RVA: 0x002F969E File Offset: 0x002F789E
		public virtual TObjectName OnIndexName
		{
			get
			{
				return this.onIndexName;
			}
			set
			{
				this.onIndexName = value;
			}
		}

		// Token: 0x1700004B RID: 75
		// (get) Token: 0x0600030E RID: 782 RVA: 0x002F96A7 File Offset: 0x002F78A7
		// (set) Token: 0x0600030F RID: 783 RVA: 0x002F96AF File Offset: 0x002F78AF
		public virtual EAlterIndexOption AlterIndexOption
		{
			get
			{
				return this.alterIndexOption;
			}
			set
			{
				this.alterIndexOption = value;
			}
		}

		// Token: 0x1700004C RID: 76
		// (get) Token: 0x06000310 RID: 784 RVA: 0x002F96B8 File Offset: 0x002F78B8
		// (set) Token: 0x06000311 RID: 785 RVA: 0x002F96C0 File Offset: 0x002F78C0
		public virtual List<THiveKeyValueProperty> IndexProperties
		{
			get
			{
				return this.indexProperties;
			}
			set
			{
				this.indexProperties = value;
			}
		}

		// Token: 0x1700004D RID: 77
		// (get) Token: 0x06000312 RID: 786 RVA: 0x002F96C9 File Offset: 0x002F78C9
		// (set) Token: 0x06000313 RID: 787 RVA: 0x002F96D1 File Offset: 0x002F78D1
		public virtual TPartitionExtensionClause PartitionSpec
		{
			get
			{
				return this.partitionSpec;
			}
			set
			{
				this.partitionSpec = value;
			}
		}

		// Token: 0x06000314 RID: 788 RVA: 0x002F96DC File Offset: 0x002F78DC
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TAlterIndexSqlNode talterIndexSqlNode = (TAlterIndexSqlNode)this.rootNode;
			this.indexName = talterIndexSqlNode.IndexName;
			base.DatabaseObjects.Add(this.indexName);
			this.onIndexName = talterIndexSqlNode.OnIndexName;
			this.partitionSpec = talterIndexSqlNode.PartitionSpec;
			this.indexProperties = talterIndexSqlNode.IndexProperties;
			this.alterIndexOption = talterIndexSqlNode.AlterIndexOption;
			return 0;
		}

		// Token: 0x06000315 RID: 789 RVA: 0x002F9755 File Offset: 0x002F7955
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000316 RID: 790 RVA: 0x002F9765 File Offset: 0x002F7965
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001095 RID: 4245
		private TObjectName onIndexName;

		// Token: 0x04001096 RID: 4246
		private EAlterIndexOption alterIndexOption;

		// Token: 0x04001097 RID: 4247
		private List<THiveKeyValueProperty> indexProperties;

		// Token: 0x04001098 RID: 4248
		private TPartitionExtensionClause partitionSpec;

		// Token: 0x04001099 RID: 4249
		private TObjectName indexName;
	}
}
